<?php 
include "connect.php";

$tea=$_POST['tea'];
$name=$_POST['name'];
$f_name=$_POST['f_name'];
$dob=$_POST['dob'];
$gender=$_POST['gender'];
$nic=$_POST['nic'];
$address=$_POST['address'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$designation=$_POST['designation'];
$pay_per_day=$_POST['pay_per_day'];
$campus_id=$_POST['campus_id'];
$dept_id=$_POST['dept_id'];
$joining_date=$_POST['joining_date'];
$status=$_POST['status'];
$qualification_name=$_POST['qualification_name'];
$university=$_POST['university'];
$grade=$_POST['grade'];
$cgpa=$_POST['cgpa'];
$passing_year=$_POST['passing_year'];

$sql="INSERT INTO teacher (teacher_id,name,f_name,dob,gender,nic,address,phone,mobile,designation,pay_per_day,campus_id,dept_id,joining_date,status) VALUES ('$tea','$name','$f_name','$dob','$gender','$nic','$address','$phone','$mobile','$designation','$pay_per_day','$campus_id','$dept_id','$joining_date','$status')";
mysql_query($sql) or die (mysql_error());

$sql2="insert into teacher_academic (teacher_id,qualification_name,university,grade,cgpa,passing_year) VALUES ('$tea','$qualification_name','$university','$grade','$cgpa','$passing_year')" or die (mysql_error());

mysql_query($sql2) or die (mysql_error());


header("location:add_teacher_success.php");

?>